package com.springcloud.market.api.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "stock", path = "/stock")
public interface StockFeignService {
    @RequestMapping("/reduce")
    String reduce();

    @RequestMapping("/reduceStock")
    String reduceStock(@RequestParam("productId") Integer productId, @RequestParam("quantity") Integer quantity);

    @PostMapping("/seata/reduce")
    String seataReduce(@RequestParam("productId") Integer productId);

}